<template>
	<view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">紫微排盘</view>
			</view>
			<view class="mainpadding">
				<view class="flexbetween xiaohei titletext">
					<view>缘主姓名</view>
					<view>{{dataAll.base_info.name}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>性别</view>
					<view>{{dataAll.base_info.gendertype}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>年龄</view>
					<view>{{dataAll.base_info.age}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>阳历</view>
					<view>{{dataAll.base_info.gongli}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>农历</view>
					<view>{{dataAll.base_info.nongli}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>命四化</view>
					<view>[{{dataAll.base_info.mingsihua}}]</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>身宫在{{dataAll.base_info.shengong}} 子斗在{{dataAll.base_info.zidou}} 流斗在{{dataAll.base_info.liudou}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>盘类</view>
					<view>天盘{{dataAll.base_info.mingju}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>命主</view>
					<view>{{dataAll.base_info.mingzhu}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>身主</view>
					<view>{{dataAll.base_info.shenzhu}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>乾造</view>
					<view>{{dataAll.base_info.yeargz}} {{dataAll.base_info.monthgz}} {{dataAll.base_info.daygz}} {{dataAll.base_info.hourgz}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>纳音</view>
					<view>{{dataAll.base_info.yearnayin}} {{dataAll.base_info.monthnayin}} {{dataAll.base_info.daynayin}} {{dataAll.base_info.hournayin}}</view>
				</view>
			</view>
		</view>
		<view class=" flexleft flex_wrap">
			<view class="mainpadding margin_top ffffff xiaohei titletext" v-for="(item,index) in dataAll.gong_pan" :key="index" style="width: 50%;box-sizing: border-box;" :class="index%2==0?'left':''" >
				<view class="" style="height: 30rpx;">{{item.ziweixing}} {{item.ziweixing_xingyao}} {{item.ziweixing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.tianfuxing}} {{item.tianfuxing_xingyao}} {{item.tianfuxing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.monthxing}} {{item.monthxing_xingyao}} {{item.monthxing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.hourxing}} {{item.hourxing_xingyao}} {{item.hourxing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.yearganxing}} {{item.yearganxing_xingyao}} {{item.yearganxing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.yearzhixing}} {{item.yearzhixing_xingyao}} {{item.yearzhixing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.qitaxing}} {{item.qitaxing_xingyao}} {{item.qitaxing_sihua}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.boshi}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.xiaoxian}}</view>
				<view class="margin_top" style="height: 30rpx;">{{item.daxian}} {{item.changsheng}} {{item.minggong}} {{item.yinshou}}</view>
			</view>
		</view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">排盘简批</view>
			</view>
			<view class="mainpadding" v-for="(item,index) in dataAll.gong_pan" :key="index">
				<view class="sanshier xiaohei fonweight">{{item.minggong}}:</view>
				<view class="xiaohui margin_top titletext">[紫微星系]：{{item.ziweixing_desc}}</view>
				<view class="xiaohui margin_top titletext">[天府星系]：{{item.tianfuxing_desc}}</view>
				<view class="xiaohui margin_top titletext">[辅星详解]：{{item.fuxing_desc}}</view>
			</view>
		</view>
		<view class="mainpadding margin_top6">
			<view class="bigbtn" @click="backpage">返回重测</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				dataAll: {}
			}
		},
		onLoad(options) {
			let data = JSON.parse(decodeURIComponent(options.msg));
			console.log(data);
			this.getDetail(data)
		},
		methods: {
			getDetail(data) {
				httpRequest.request(data.url, 'POST', data.data).then(res => {
					if(res.code==1){
						this.dataAll = res.data
					}else{
						httpRequest.toast(res.msg)
						setTimeout(()=>{
							uni.navigateBack(1)
						},1000)
					}
				}).catch(err => {})
			},
		}
	}
</script>

<style>
.left{
	border-right:1rpx solid #E1E1E1;
}
</style>
